package be.kuleuven.cs.mume.gestures;

import org.mt4j.input.inputProcessors.IGestureEventListener;
import org.mt4j.input.inputProcessors.MTGestureEvent;
import org.mt4j.input.inputProcessors.componentProcessors.dragProcessor.DragEvent;
import org.mt4j.util.MTColor;

import be.kuleuven.cs.mume.objects.HelloWorldObject;


	public class MyDragGesture implements IGestureEventListener {
		
		protected final MTColor clearColor = new MTColor(146, 150, 188, 255);
		
		public boolean processGestureEvent(MTGestureEvent ge) {
			DragEvent te = (DragEvent)ge;
			HelloWorldObject obj = (HelloWorldObject)te.getTargetComponent();
			switch (te.getId()) {
			case MTGestureEvent.GESTURE_DETECTED:
				obj.getRect().setFillColor(new MTColor(20,20,220,255));
//				rect.setNoFill(false);
				break;
			case MTGestureEvent.GESTURE_UPDATED:
				break;
			case MTGestureEvent.GESTURE_ENDED:
				obj.getRect().setFillColor(clearColor);
				break;
			}
			return false;
		}
	}